/*
package com.healthcloud.utils;

import java.io.*;

import org.springframework.web.multipart.MultipartFile;

*/
/**
 * 文件工具类
 * @author zj
 * 2017年6月29日 上午9:49:50
 *//*


public class FileUtils {
	
	public static File saveFile(MultipartFile file, String path) throws IllegalStateException, IOException{
		File f = new File(path);
		file.transferTo(f);
		return f;
	}

	*/
/**
	 * 输出指定文件的byte数组
	 *
	 * @param filePath 文件路径
	 * @param os 输出流
	 * @return
	 *//*

	public static void writeBytes(String filePath, OutputStream os) throws IOException
	{
		FileInputStream fis = null;
		try
		{
			File file = new File(filePath);
			if (!file.exists())
			{
				throw new FileNotFoundException(filePath);
			}
			fis = new FileInputStream(file);
			byte[] b = new byte[1024];
			int length;
			while ((length = fis.read(b)) > 0)
			{
				os.write(b, 0, length);
			}
		}
		catch (IOException e)
		{
			throw e;
		}
		finally
		{
			if (os != null)
			{
				try
				{
					os.close();
				}
				catch (IOException e1)
				{
					e1.printStackTrace();
				}
			}
			if (fis != null)
			{
				try
				{
					fis.close();
				}
				catch (IOException e1)
				{
					e1.printStackTrace();
				}
			}
		}
	}
	
}
*/
